<!DOCTYPE html>
<!--
 | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/examples/profiles.md at 2024-05-26
 | Rendered using Apache Maven Fluido Skin 1.7
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="Date-Revision-yyyymmdd" content="20240526" />
    <meta http-equiv="Content-Language" content="en" />
    <title>org.panteleyev:jpackage-maven-plugin &#x2013; Configuration with profiles</title>
    <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
    <link rel="stylesheet" href="../css/site.css" />
    <link rel="stylesheet" href="../css/print.css" media="print" />
    <script type="text/javascript" src="../js/apache-maven-fluido-1.7.min.js"></script>
  </head>
  <body class="topBarDisabled">
    <div class="container-fluid">
      <div id="banner">
        <div class="pull-left"><div id="bannerLeft"><h2>org.panteleyev:jpackage-maven-plugin</h2>
</div>
</div>
        <div class="pull-right"></div>
        <div class="clear"><hr/></div>
      </div>

      <div id="breadcrumbs">
        <ul class="breadcrumb">
        <li id="publishDate">Last Published: 2024-05-26<span class="divider">|</span>
</li>
          <li id="projectVersion">Version: 1.6.4</li>
        </ul>
      </div>
      <div class="row-fluid">
        <div id="leftColumn" class="span2">
          <div class="well sidebar-nav">
    <ul class="nav nav-list">
      <li class="nav-header">Overview</li>
    <li><a href="../index.html" title="Introduction"><span class="none"></span>Introduction</a></li>
    <li><a href="../plugin-info.html" title="Goals"><span class="none"></span>Goals</a></li>
    <li><a href="../usage.html" title="Usage"><span class="none"></span>Usage</a></li>
      <li class="nav-header">Examples</li>
    <li><a href="../examples/full-jre.html" title="Image with full JRE"><span class="none"></span>Image with full JRE</a></li>
    <li><a href="../examples/executions.html" title="Configuration with executions"><span class="none"></span>Configuration with executions</a></li>
    <li class="active"><a href="#"><span class="none"></span>Configuration with profiles</a></li>
      <li class="nav-header">Project</li>
    <li><a href="../summary.html" title="Summary"><span class="none"></span>Summary</a></li>
    <li><a href="../scm.html" title="Source"><span class="none"></span>Source</a></li>
    <li><a href="../dependencies.html" title="Dependencies"><span class="none"></span>Dependencies</a></li>
</ul>
          <hr />
          <div id="poweredBy">
            <div class="clear"></div>
            <div class="clear"></div>
            <div class="clear"></div>
            <div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
            </div>
          </div>
        </div>
        <div id="bodyColumn"  class="span10" >
<section>
<h2><a name="Configuration_with_profiles"></a>Configuration with profiles</h2>

<div class="source"><pre class="prettyprint"><code class="language-xml">
&lt;project&gt;
    &lt;profiles&gt;
        &lt;profile&gt;
            &lt;id&gt;win&lt;/id&gt;
            &lt;activation&gt;
                &lt;os&gt;
                    &lt;family&gt;windows&lt;/family&gt;
                &lt;/os&gt;
            &lt;/activation&gt;
            &lt;build&gt;
                &lt;plugins&gt;
                    &lt;plugin&gt;
                        &lt;groupId&gt;org.panteleyev&lt;/groupId&gt;
                        &lt;artifactId&gt;jpackage-maven-plugin&lt;/artifactId&gt;
                        &lt;version&gt;1.6.4&lt;/version&gt;

                        &lt;configuration&gt;
                            &lt;icon&gt;icons/icons.ico&lt;/icon&gt;
                            &lt;winMenu&gt;true&lt;/winMenu&gt;
                        &lt;/configuration&gt;
                    &lt;/plugin&gt;
                &lt;/plugins&gt;
            &lt;/build&gt;
        &lt;/profile&gt;
        &lt;profile&gt;
            &lt;id&gt;mac&lt;/id&gt;
            &lt;activation&gt;
                &lt;os&gt;
                    &lt;family&gt;mac&lt;/family&gt;
                &lt;/os&gt;
            &lt;/activation&gt;
            &lt;build&gt;
                &lt;plugins&gt;
                    &lt;plugin&gt;
                        &lt;groupId&gt;org.panteleyev&lt;/groupId&gt;
                        &lt;artifactId&gt;jpackage-maven-plugin&lt;/artifactId&gt;
                        &lt;version&gt;1.6.4&lt;/version&gt;

                        &lt;configuration&gt;
                            &lt;icon&gt;icons/icons.icns&lt;/icon&gt;
                        &lt;/configuration&gt;
                    &lt;/plugin&gt;
                &lt;/plugins&gt;
            &lt;/build&gt;
        &lt;/profile&gt;
        &lt;profile&gt;
            &lt;id&gt;mac&lt;/id&gt;
            &lt;activation&gt;
                &lt;os&gt;
                    &lt;family&gt;unix&lt;/family&gt;
                &lt;/os&gt;
            &lt;/activation&gt;
            &lt;build&gt;
                &lt;plugins&gt;
                    &lt;plugin&gt;
                        &lt;groupId&gt;org.panteleyev&lt;/groupId&gt;
                        &lt;artifactId&gt;jpackage-maven-plugin&lt;/artifactId&gt;
                        &lt;version&gt;1.6.4&lt;/version&gt;

                        &lt;configuration&gt;
                            &lt;type&gt;APP_IMAGE&lt;/type&gt;
                            &lt;icon&gt;icons/icon.png&lt;/icon&gt;
                        &lt;/configuration&gt;
                    &lt;/plugin&gt;
                &lt;/plugins&gt;
            &lt;/build&gt;
        &lt;/profile&gt;
    &lt;/profiles&gt;

    &lt;build&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.panteleyev&lt;/groupId&gt;
                &lt;artifactId&gt;jpackage-maven-plugin&lt;/artifactId&gt;
                &lt;version&gt;1.6.4&lt;/version&gt;

                &lt;!-- Common part of configuration --&gt;
                &lt;configuration&gt;
                    &lt;name&gt;Application Name&lt;/name&gt;
                    &lt;appVersion&gt;${project.version}&lt;/appVersion&gt;
                    &lt;vendor&gt;app.org&lt;/vendor&gt;
                    &lt;module&gt;${appModule}/${appMainClass}&lt;/module&gt;
                    &lt;modulePaths&gt;
                        &lt;modulePath&gt;target/mods&lt;/modulePath&gt;
                    &lt;/modulePaths&gt;
                    &lt;destination&gt;target/dist&lt;/destination&gt;
                    &lt;javaOptions&gt;
                        &lt;option&gt;--enable-preview&lt;/option&gt;
                        &lt;option&gt;-Dfile.encoding=UTF-8&lt;/option&gt;
                    &lt;/javaOptions&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
&lt;/project&gt;
</code></pre></div>
<p>With above execution configuration the following command lines can be used regardless of the platform:</p>

<div class="source"><pre class="prettyprint"><code>mvn clean package jpackage:jpackage
</code></pre></div></section>
        </div>
      </div>
    </div>
    <hr/>
    <footer>
      <div class="container-fluid">
        <div class="row-fluid">
Copyright (c) 2020-2024, Petr Panteleyev
        </div>
      </div>
    </footer>
  </body>
</html>
